package com.htthorizon.system.api;

import com.htthorizon.common.core.constant.ServiceNameConstants;
import com.htthorizon.common.core.domain.R;

import com.htthorizon.system.api.factory.RemoteFileFallbackFactory;
import com.htthorizon.system.api.model.ModelInfoReq;
import com.htthorizon.system.api.domain.Config;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 模型相关服务
 * 
 * @author mark
 */
@FeignClient(contextId = "remoteModelService", value = ServiceNameConstants.MANAGE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
public interface RemoteModelService
{
    /**
     * 保存模型的元数据
     *
     * @param modelInfoReq 模型信息
     * @return 结果
     */
    @RequestMapping(value = "/model/meta/save",method = RequestMethod.POST)
    public R<Boolean> saveMeta(@RequestBody ModelInfoReq modelInfoReq);

    @RequestMapping(value = "/config/get",method = RequestMethod.GET)
    public R<Config> get();

    @RequestMapping(value = "/config/edit",method = RequestMethod.POST)
    public R edit(@RequestBody Config config);
}
